//
//  JFNetBaseInstance.m
//  JFBase
//
//  Created by Alan Wang on 2018/8/17.
//  Copyright © 2018年 Alan Wang. All rights reserved.
//

#import "JFNetBaseInstance.h"
#import "JFLogHelper.h"

@implementation JFNetBaseInstance
/**
 *  处理请求
 *
 *  @param reqParamVo 请求对象
 */
-(void)invoke:(JFRequestVo *)reqParamVo callBack:(JFCallBack)callback;
{
    [self debugRequest:reqParamVo];
}

/**
 *  调试模式
 */
-(void)debugRequest:(JFRequestVo *)reqParamVo
{
    if (reqParamVo && reqParamVo.isDebug)
    {
        NSMutableString *reqStr = [NSMutableString string];
        NSDictionary *reqParam = reqParamVo.reqParam;
        if (reqParam)
        {
            for (NSString *key in reqParam.allKeys)
            {
                [reqStr appendFormat:@"%@:%@\n",key,reqParam[key]];
            }
            NSString * str  = [NSString stringWithFormat:@"\n-------请求URL---------\n%@\n------请求参数begin-------\n%@--------请求参数end--------",reqParamVo.url,reqStr];
            [JFLogHelper stringSyncWriteLogToConsole:str];
        }
    }
}

-(void)clearRequest:(NSString *)flowNo{
    
}

- (void)clearAllRequest{
   
}

- (void)clearRequest:(NSString *)flowNo baseUri:(NSString *)url {

}


@end
